package com.rankeiot.ai.domain;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.sql.Types;

import lombok.Data;
import lombok.experimental.FieldNameConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import org.sagacity.sqltoy.config.annotation.Entity;
import org.sagacity.sqltoy.config.annotation.Id;
import org.sagacity.sqltoy.config.annotation.Column;
import jakarta.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;


/**
* AI应用
*/
@Schema(description="AI应用")
@Data
@FieldNameConstants(asEnum = true)
@Entity(tableName=Application.TABLE)
public class Application implements Serializable{
    public static final String TABLE="ai_application";

    /**
    * id
    */
    @Schema(description="id")
    @Id(strategy = "generator",generator = "snowflake")
    @Length(max=32)
    @Column(name="id",length=32L,type=Types.VARCHAR,nullable=false)
    private String id;
    /**
    * 名称
    */
    @Schema(description="名称")
    @NotNull
    @Length(max=255)
    @Column(name="name",length=255L,type=Types.VARCHAR,nullable=false)
    private String name;
    /**
    * 系统提示词
    */
    @Schema(description="系统提示词")
    @Length(max=255)
    @Column(name="prompt",length=255L,type=Types.VARCHAR)
    private String prompt;
    /**
    * 说明
    */
    @Schema(description="说明")
    @Length(max=255)
    @Column(name="memo",length=255L,type=Types.VARCHAR)
    private String memo;
    /**
    * 图标
    */
    @Schema(description="图标")
    @Length(max=255)
    @Column(name="icon_img",length=255L,type=Types.VARCHAR)
    private String iconImg;
    /**
    * AI HOST
    */
    @Schema(description="AI HOST")
    @NotNull
    @Length(max=255)
    @Column(name="ai_host",length=255L,type=Types.VARCHAR,nullable=false)
    private String aiHost;
    /**
    * AI KEY
    */
    @Schema(description="AI KEY")
    @NotNull
    @Length(max=255)
    @Column(name="ai_key",length=255L,type=Types.VARCHAR,nullable=false)
    private String aiKey;
    /**
    * 使用模型
    */
    @Schema(description="使用模型")
    @NotNull
    @Length(max=255)
    @Column(name="mode",length=255L,type=Types.VARCHAR,nullable=false)
    private String mode;
    /**
    * temperature
    */
    @Schema(description="temperature")
    @Column(name="temperature",length=12L,type=Types.REAL)
    private Float temperature;
    /**
    * top_p
    */
    @Schema(description="top_p")
    @Column(name="top_p",length=12L,type=Types.REAL)
    private Float topP;
    /**
    * penalty_score
    */
    @Schema(description="penalty_score")
    @Column(name="penalty_score",length=12L,type=Types.REAL)
    private Float penaltyScore;
    /**
    * disable_search
    */
    @Schema(description="disable_search")
    @Column(name="disable_search",length=3L,type=Types.TINYINT)
    private Boolean disableSearch;
    /**
    * 应用密钥
    */
    @Schema(description="应用密钥")
    @Length(max=255)
    @Column(name="app_key",length=255L,type=Types.VARCHAR)
    private String appKey;
    /**
    * 创建人
    */
    @Schema(description="创建人")
    @Length(max=255)
    @Column(name="creator",length=255L,type=Types.VARCHAR)
    private String creator;
    /**
    * 创建时间
    */
    @Schema(description="创建时间")
    @Column(name="create_time",length=19L,type=Types.TIMESTAMP)
    private Date createTime;
    /**
    * 是否启用
    */
    @Schema(description="是否启用")
    @Column(name="enable",length=3L,type=Types.TINYINT)
    private Boolean enable;

    public Application(){}
    public Application(String id){
            this.id=id;
        }
}
